home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr47 / fn32_3.zip / TESTSTAT.C < prev    next >
C/C++ Source or Header  |  1993-02-07  |  645b  |  33 lines

  1. /* teststat.c 
  2. ** compile: cl    -AC teststat.c xstat.obj
  3. **   or        cl    -AL teststat.c xstat.obj
  4. **
  5. **    command args are files or directories without wildcards
  6. */
  7.  
  8. #include "xstat.h"
  9. extern char *ctime();
  10.  
  11. main(int argc, char **argv)
  12. {
  13. _XSTAT *stats;
  14. int i,j;
  15.  
  16.     for(i = 1; i < argc; ++i)
  17.     {
  18.         if(stats = xxstat(argv[i]))
  19.         {
  20.             printf("%s    %s", argv[i], ctime(&stats->st_atime));
  21.             for(j = 0; j < stats->st_chunkcnt; ++j)
  22.                 printf("    %u    block=%lu    numblks=%u\n",
  23.                    j, stats->st_chunklist[j].block, stats->st_chunklist[j].cnt);
  24.             xstat_free(stats);
  25.         }
  26.         else
  27.         {
  28.             printf("%s    Can't stat.\n", argv[i]);
  29.         }
  30.     }
  31. }
  32.  
  33.